/*
 Navicat Premium Data Transfer

 Source Server         : localhost
 Source Server Type    : MySQL
 Source Server Version : 50731
 Source Host           : localhost:3306
 Source Schema         : tp6_sw

 Target Server Type    : MySQL
 Target Server Version : 50731
 File Encoding         : 65001

 Date: 09/05/2024 22:49:57
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for mall_admin_user
-- ----------------------------
DROP TABLE IF EXISTS `mall_admin_user`;
CREATE TABLE `mall_admin_user` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `username` varchar(100) NOT NULL,
  `password` char(32) NOT NULL,
  `status` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '状态码：1=正常,0=异常，99=删除',
  `create_time` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
  `update_time` int(10) NOT NULL DEFAULT '0' COMMENT '更新时间',
  `last_login_time` int(10) NOT NULL DEFAULT '0' COMMENT '最后登录时间',
  `last_login_ip` varchar(100) NOT NULL COMMENT '最后登录ip',
  `operate_user` varchar(100) DEFAULT NULL COMMENT '操作人',
  PRIMARY KEY (`id`,`username`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of mall_admin_user
-- ----------------------------
BEGIN;
INSERT INTO `mall_admin_user` VALUES (1, 'admin', '505a130cef02004784f8c252dbde0d83', 1, 0, 1715261452, 1715261452, '127.0.0.1', 'admin');
COMMIT;

-- ----------------------------
-- Table structure for mall_category
-- ----------------------------
DROP TABLE IF EXISTS `mall_category`;
CREATE TABLE `mall_category` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL DEFAULT '' COMMENT '分类名称',
  `pid` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '父类ID',
  `icon` varchar(255) NOT NULL DEFAULT '' COMMENT '图标',
  `path` varchar(255) NOT NULL DEFAULT '' COMMENT '路径',
  `create_time` int(10) unsigned NOT NULL DEFAULT '0',
  `update_time` int(10) unsigned NOT NULL DEFAULT '0',
  `operate_user` varchar(100) NOT NULL DEFAULT '' COMMENT '操作人',
  `status` tinyint(1) unsigned NOT NULL DEFAULT '0',
  `listorder` int(10) NOT NULL DEFAULT '0' COMMENT '排序',
  PRIMARY KEY (`id`),
  UNIQUE KEY `name` (`name`) USING BTREE,
  KEY `pid` (`pid`)
) ENGINE=InnoDB AUTO_INCREMENT=86 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of mall_category
-- ----------------------------
BEGIN;
INSERT INTO `mall_category` VALUES (26, '男装', 0, '', '', 1715261474, 1715261978, '', 1, 20);
INSERT INTO `mall_category` VALUES (28, '上装', 26, '', '', 1715261524, 1715261524, '', 1, 0);
INSERT INTO `mall_category` VALUES (29, '潮流风向标', 26, '', '', 1715261552, 1715261552, '', 1, 0);
INSERT INTO `mall_category` VALUES (30, '下装', 26, '', '', 1715261561, 1715261561, '', 1, 0);
INSERT INTO `mall_category` VALUES (31, '马甲', 28, '', '', 1715261577, 1715261577, '', 1, 0);
INSERT INTO `mall_category` VALUES (32, '西服', 28, '', '', 1715261582, 1715261582, '', 1, 0);
INSERT INTO `mall_category` VALUES (33, '衬衫', 28, '', '', 1715261590, 1715261590, '', 1, 0);
INSERT INTO `mall_category` VALUES (34, '卫衣', 28, '', '', 1715261594, 1715261594, '', 1, 0);
INSERT INTO `mall_category` VALUES (35, '夹克', 28, '', '', 1715261598, 1715261598, '', 1, 0);
INSERT INTO `mall_category` VALUES (36, '夏季热卖', 29, '', '', 1715261624, 1715261624, '', 1, 0);
INSERT INTO `mall_category` VALUES (37, '玩酷时尚', 29, '', '', 1715261633, 1715261633, '', 1, 0);
INSERT INTO `mall_category` VALUES (38, '雅痞绅潮', 29, '', '', 1715261647, 1715261647, '', 1, 0);
INSERT INTO `mall_category` VALUES (39, '夏季爆款', 29, '', '', 1715261654, 1715261654, '', 1, 0);
INSERT INTO `mall_category` VALUES (40, '哈伦裤', 30, '', '', 1715261665, 1715261665, '', 1, 0);
INSERT INTO `mall_category` VALUES (41, '运动裤', 30, '', '', 1715261670, 1715261670, '', 1, 0);
INSERT INTO `mall_category` VALUES (42, '修身裤装', 30, '', '', 1715261679, 1715261679, '', 1, 0);
INSERT INTO `mall_category` VALUES (43, '休闲裤', 30, '', '', 1715261684, 1715261684, '', 1, 0);
INSERT INTO `mall_category` VALUES (44, '牛仔裤', 30, '', '', 1715261689, 1715261689, '', 1, 0);
INSERT INTO `mall_category` VALUES (45, '女装', 0, '', '', 1715261699, 1715261984, '', 1, 10);
INSERT INTO `mall_category` VALUES (46, '女士上装', 45, '', '', 1715261710, 1715261710, '', 1, 0);
INSERT INTO `mall_category` VALUES (47, '女士下装', 45, '', '', 1715261716, 1715261716, '', 1, 0);
INSERT INTO `mall_category` VALUES (48, '女士裙装', 45, '', '', 1715261720, 1715261720, '', 1, 0);
INSERT INTO `mall_category` VALUES (49, '电脑', 0, '', '', 1715261749, 1715261989, '', 1, 8);
INSERT INTO `mall_category` VALUES (50, '小米', 49, '', '', 1715261756, 1715261756, '', 1, 0);
INSERT INTO `mall_category` VALUES (51, '戴尔', 49, '', '', 1715261764, 1715261764, '', 1, 0);
INSERT INTO `mall_category` VALUES (52, '苹果', 49, '', '', 1715261767, 1715261767, '', 1, 0);
INSERT INTO `mall_category` VALUES (53, '手机', 0, '', '', 1715261778, 1715261992, '', 1, 7);
INSERT INTO `mall_category` VALUES (54, '三星', 53, '', '', 1715261785, 1715261785, '', 1, 0);
INSERT INTO `mall_category` VALUES (57, '华为', 53, '', '', 1715261797, 1715261797, '', 1, 0);
INSERT INTO `mall_category` VALUES (58, '书', 0, '', '', 1715261804, 1715261804, '', 1, 0);
INSERT INTO `mall_category` VALUES (59, '励志', 58, '', '', 1715261812, 1715261846, '', 99, 0);
INSERT INTO `mall_category` VALUES (60, '计算机', 58, '', '', 1715261815, 1715261815, '', 1, 0);
INSERT INTO `mall_category` VALUES (61, '历史', 58, '', '', 1715261818, 1715261818, '', 1, 0);
INSERT INTO `mall_category` VALUES (62, '小说', 58, '', '', 1715261823, 1715261823, '', 1, 0);
INSERT INTO `mall_category` VALUES (64, '背带裙', 48, '', '', 1715261889, 1715261889, '', 1, 0);
INSERT INTO `mall_category` VALUES (65, '连衣裙', 48, '', '', 1715261912, 1715261912, '', 1, 0);
INSERT INTO `mall_category` VALUES (68, '打底裤', 47, '', '', 1715261928, 1715261928, '', 1, 0);
INSERT INTO `mall_category` VALUES (70, '小脚裤', 47, '', '', 1715261938, 1715261938, '', 1, 0);
INSERT INTO `mall_category` VALUES (72, '毛衣外套', 46, '', '', 1715261953, 1715261953, '', 1, 0);
INSERT INTO `mall_category` VALUES (73, '牛仔外套', 46, '', '', 1715261959, 1715261959, '', 1, 0);
INSERT INTO `mall_category` VALUES (74, 'MacBookPro', 52, '', '', 1715262852, 1715262852, '', 1, 0);
INSERT INTO `mall_category` VALUES (75, 'MacBookAir', 52, '', '', 1715262864, 1715262864, '', 1, 0);
INSERT INTO `mall_category` VALUES (76, '小米游戏本', 50, '', '', 1715262873, 1715262873, '', 1, 0);
INSERT INTO `mall_category` VALUES (77, '办公本', 51, '', '', 1715262879, 1715262879, '', 1, 0);
INSERT INTO `mall_category` VALUES (78, 'S16', 54, '', '', 1715262889, 1715262889, '', 1, 0);
INSERT INTO `mall_category` VALUES (79, '遥遥领先', 57, '', '', 1715262909, 1715262909, '', 1, 0);
INSERT INTO `mall_category` VALUES (80, '领先同行', 57, '', '', 1715262922, 1715262922, '', 1, 0);
INSERT INTO `mall_category` VALUES (81, '狼性文化', 57, '', '', 1715262929, 1715262929, '', 1, 0);
INSERT INTO `mall_category` VALUES (82, '人世间', 62, '', '', 1715262944, 1715262944, '', 1, 0);
INSERT INTO `mall_category` VALUES (83, '从删库到跑路', 60, '', '', 1715262984, 1715262984, '', 1, 0);
INSERT INTO `mall_category` VALUES (84, '资治通鉴', 61, '', '', 1715263009, 1715263009, '', 1, 0);
INSERT INTO `mall_category` VALUES (85, '大明王朝', 61, '', '', 1715263023, 1715263023, '', 1, 0);
COMMIT;

-- ----------------------------
-- Table structure for mall_demo
-- ----------------------------
DROP TABLE IF EXISTS `mall_demo`;
CREATE TABLE `mall_demo` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `category_id` int(11) DEFAULT NULL,
  `createtime` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of mall_demo
-- ----------------------------
BEGIN;
INSERT INTO `mall_demo` VALUES (1, 1, 111111);
INSERT INTO `mall_demo` VALUES (2, 2, 111111);
INSERT INTO `mall_demo` VALUES (3, 3, 111111);
INSERT INTO `mall_demo` VALUES (4, 3, 111111);
COMMIT;

-- ----------------------------
-- Table structure for mall_goods
-- ----------------------------
DROP TABLE IF EXISTS `mall_goods`;
CREATE TABLE `mall_goods` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `title` varchar(255) NOT NULL DEFAULT '' COMMENT '商品标题',
  `category_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '商品分类',
  `category_path_id` varchar(20) NOT NULL DEFAULT '' COMMENT '栏目ID path',
  `promotion_title` varchar(255) NOT NULL DEFAULT '' COMMENT '商品促销语',
  `goods_unit` varchar(25) NOT NULL DEFAULT '' COMMENT '商品单位',
  `keywords` varchar(100) NOT NULL DEFAULT '' COMMENT '关键词',
  `sub_title` varchar(100) NOT NULL DEFAULT '' COMMENT '副标题',
  `stock` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '库存',
  `price` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '现价',
  `cost_price` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '原价',
  `sku_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '商品默认的sku_id',
  `is_show_stock` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否显示库存',
  `production_time` varchar(10) NOT NULL DEFAULT '0' COMMENT '生产日期',
  `goods_specs_type` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '商品规则:1=统一规则，2=多规格',
  `big_image` varchar(255) NOT NULL DEFAULT '' COMMENT '大图',
  `recomment_image` varchar(255) NOT NULL DEFAULT '' COMMENT '商品推荐图',
  `carousel_image` varchar(255) NOT NULL DEFAULT '' COMMENT '详情页轮播图',
  `description` text NOT NULL COMMENT '商品详情',
  `is_index_recommend` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否首页推荐大图商品',
  `goods_specs_data` varchar(255) NOT NULL DEFAULT '' COMMENT '所有规则属性存放json',
  `create_time` int(10) unsigned NOT NULL,
  `update_time` int(10) unsigned NOT NULL DEFAULT '0',
  `operate_user` varchar(255) NOT NULL,
  `status` tinyint(1) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of mall_goods
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for mall_goods_sku
-- ----------------------------
DROP TABLE IF EXISTS `mall_goods_sku`;
CREATE TABLE `mall_goods_sku` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `goods_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '商品ID',
  `specs_value_ids` varchar(255) NOT NULL DEFAULT '' COMMENT '每行规则属性ID 按逗号分隔',
  `price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '现价',
  `cost_price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '原价',
  `stock` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '库存',
  `status` tinyint(1) unsigned DEFAULT '0',
  `create_time` int(10) unsigned DEFAULT '0',
  `update_tine` int(10) unsigned DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of mall_goods_sku
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for mall_specs_value
-- ----------------------------
DROP TABLE IF EXISTS `mall_specs_value`;
CREATE TABLE `mall_specs_value` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `specs_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '规格ID',
  `name` varchar(255) NOT NULL DEFAULT '' COMMENT '规格书姓名',
  `create_time` int(10) unsigned NOT NULL DEFAULT '0',
  `update_time` int(10) unsigned NOT NULL DEFAULT '0',
  `operate_user` varchar(255) NOT NULL DEFAULT '',
  `status` tinyint(1) unsigned DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of mall_specs_value
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for mall_user
-- ----------------------------
DROP TABLE IF EXISTS `mall_user`;
CREATE TABLE `mall_user` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `username` varchar(100) NOT NULL COMMENT '用户名',
  `phone_number` varchar(20) NOT NULL DEFAULT '0' COMMENT '手机号',
  `password` char(32) NOT NULL DEFAULT '' COMMENT '密码',
  `ltype` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '登录方式：0=手机号登录，1=用户名密码登录',
  `type` tinyint(1) NOT NULL DEFAULT '0' COMMENT '会话保存天数',
  `sex` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '性别',
  `create_time` int(10) NOT NULL,
  `update_time` int(10) NOT NULL,
  `status` tinyint(1) NOT NULL,
  `operate_user` varchar(100) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `username` (`username`),
  KEY `phone_number` (`phone_number`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of mall_user
-- ----------------------------
BEGIN;
INSERT INTO `mall_user` VALUES (1, 'sw-123456', '123456', '', 0, 1, 1, 1715182573, 1715182573, 1, NULL);
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
